package com.berchina.service.impl;

import com.berchina.bean.Master;
import com.berchina.mapper.MasterMapper;
import com.berchina.service.MasterService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MasterServiceImp implements MasterService {
    @Autowired
    private MasterMapper masterMapper;

    public PageInfo<Master> findMasterPage(Integer page, Integer limit) {
        PageHelper.startPage(page,limit);
        List<Master> list=masterMapper.findMastersPage();
        return new PageInfo<Master>(list);
    }
}
